Recording medium, system and method

ABSTRACT

A non-transitory computer-readable recording medium has stored therein a program for causing a computer to execute a process. The process includes identifying a data block from among a plurality of data blocks in a first storage for relocation to a second storage, determining an access mode of the identified data block, the access mode including sequential access or random access, and relocating the identified data block to the second storage based on the determined access mode.

CROSS-REFERENCE TO RELATED APPLICATION

This application is based upon and claims the benefit of priority of theprior Japanese Patent Application No. 2013-063854, filed on Mar. 26,2013, the entire contents of which are incorporated herein by reference.

FIELD

The embodiment discussed herein is related to a recording medium, asystem and a method.

BACKGROUND

Three types of disk drives, namely a solid state drive (SSD), a serialattached small computer system interface (SCSI) (SAS) disk, and a serialadvanced technology attachment (SATA) disk, can be listed as examples ofdisk drives to be used in storage systems such as a disk array system.As illustrated in FIG. 1, in terms of reliability and performance, amongthe three types of disk drives, an SSD comes first, an SAS disk comessecond, and an SATA disk comes third.

If a server employs a storage device that includes a hierarchized disk(see FIG. 1) having the three types of disks that differ incharacteristics as mentioned above, storage hierarchization control asdescribed below is carried out. Specifically, with a configuration thatemploys a hierarchized disk, a data block to be relocated and a disk towhich that data block is to be relocated are determined on the basis ofthe frequency of access at a disk side, and the data block is relocatedaccordingly, as illustrated in FIG. 1.

For example, if the frequency of access to a given data block, includedin a file on the SSD is low, that data block is moved from the SSD tothe SAS disk and is relocated on the SAS disk. Similarly, if thefrequency of access to a given data block on the SAS disk is low, thatdata block is moved from the SAS disk to the SATA disk and is relocatedon the SATA disk. Meanwhile, if the frequency of access to a given datablock on the SATA disk increases, that data block is moved from the SATAdisk to the SAS disk and is relocated on the SAS disk. Similarly, if thefrequency of access to a given data block on the SAS disk increases,that data block is moved from the SAS disk to the SSD and is relocatedon the SSD.

Japanese Laid-open Patent Publication No. 2006-4011 is an example ofrelated art.

SUMMARY

According to an aspect of the embodiment, a non-transitorycomputer-readable recording medium has stored therein a program forcausing a computer to execute a process. The process includesidentifying a data block from among a plurality of data blocks in afirst storage for relocation to a second storage, determining an accessmode of the identified data block, the access mode including sequentialaccess or random access, and relocating the identified data block to thesecond storage based on the determined access mode.

The object and advantages of the embodiment will be realized andattained by the elements and combinations particularly pointed out inthe claims.

It is to be understood that both the foregoing general description andthe following detailed description are exemplary and explanatory and arenot restrictive of the claims.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 is a diagram for describing a hierarchized disk and storagehierarchization control;

FIG. 2 is a block diagram illustrating a hardware configuration and afunctional configuration of a storage system according to an embodiment;

FIG. 3 is a diagram for describing a function and an operation of thestorage system illustrated in FIG. 2;

FIG. 4 illustrates an exemplary file access mode table of theembodiment;

FIG. 5 is a flowchart for describing the operation of the storage systemillustrated in FIG. 2;

FIG. 6 is a flowchart for describing a procedure for determining anaccess mode of a target file in the embodiment;

FIG. 7 is a flowchart for describing a procedure for relocating a datablock from an SSD to an SAS disk in the embodiment;

FIG. 8 illustrates a specific example on relocation of data blocks inthe storage system illustrated in FIG. 2; and

FIG. 9 illustrates a specific example on relocation of data blocks inthe storage system illustrated in FIG. 2.

DESCRIPTION OF EMBODIMENT

The inventor has found from a study that when some of the data blocks ina sequential access file on an SSD are relocated to an SAS disk, thearrangement of the data blocks forming the file becomes nonsequential.Thus, the sequential access performance of the data blocks on the SASdisk degrades as compared with the access performance of the data blockson the SSD. As the frequency of relocation in the file increases, thedata in the file is further fragmented, and the sequential accessperformance of the data blocks on the SAS disk further degradesaccordingly.

In order to determine an access mode of a data block included in a file,that is, whether or not the data block is a sequential access datablock, and to relocate the data block accordingly so as to suppressfragmentation of the data, information on an access (read/write) layerpertaining to the specifications of an application that accesses ahierarchized disk is desired. In other words, a server that employs ahierarchized disk does not have information as to with what access modethe hierarchized disk actually arranges the data. Thus, an existinghierarchized disk experiences such a disadvantage that the sequentialaccess performance degrades and the data is fragmented throughrelocation.

According to an embodiment described hereinafter, data fragmentationcaused by relocating a data block in a hierarchized disk can besuppressed.

Hereinafter, an embodiment will be described with reference to thedrawings.

[1] Configuration of Storage System of Embodiment

FIG. 2 is a block diagram illustrating a hardware configuration and afunctional configuration of a storage system 1 according to anembodiment. As illustrated in FIG. 2, the storage system 1 includes astorage device 10 and a server (information processing device) 20.

The storage device 10, which is accessed by the server 20 (application211) and is also managed by the server 20 (management unit 213),includes a hierarchized disk 11, a central processing unit (CPU) 12, anda memory 13. In FIG. 2, a logical disk 110 is illustrated in the storagedevice 10. The logical disk 110 is identified by a logical unit number(LUN) and is a logical disk that is visible from the application 211,which will be described later.

The hierarchized disk 11 includes multiple disks, each having distinctcharacteristics. As illustrated in FIG. 2, the hierarchized disk 11 ofthe embodiment includes two types of disks, namely an SSD 111 and an SASdisk 112. Note, however, that the embodiment is not limited thereto, andthe embodiment is applied similarly to a case where the hierarchizeddisk 11 includes, for example, three types of disks, namely an SSD, anSAS disk, and an SATA disk, as in the case described above withreference to FIG. 1.

Unlike a hard disk, an SSD does not include a disk, and thus no time isspent moving a reading device (head) over the disk (i.e., seek time) orwaiting for the target data to rotate to a head position (i.e., searchtime). Thus, with an SSD, whether data blocks included in a sequentialaccess file are arranged sequentially or fragmented and arrangedrandomly does not make a difference in terms of access performance.

On the other hand, with an SAS disk or an SATA disk, if data blocksincluded in a sequential access file are fragmented and arrangedrandomly, the seek time or the search time is extended as compared withthe case where the data blocks are arranged sequentially, and thus theaccess performance degrades.

Therefore, in the embodiment, at least when a sequential access datablock is relocated on an SAS disk or an SATA disk, whether or not theaccess mode of the data block to be relocated indicates sequentialaccess is taken into consideration.

Thus, in the embodiment, when a data block is relocated from the SSD 111to the SAS disk 112, the access mode of the data block to be relocatedis determined, and the data block is relocated accordingly on the basisof the determined access mode. If the hierarchized disk 11 includes thethree types of disks described above, the data block is relocated on thebasis of the access mode thereof, as in the embodiment, when a datablock is relocated from the SSD to the SAS disk, from the SAS disk tothe SATA disk, or from the SATA disk to the SAS disk. When a data blockis relocated from the SAS disk to the SSD, the target data block may ormay not be relocated on the basis of the access mode thereof.

The CPU (processing unit, computer) 12 loads a program stored in thememory 13 and executes the program to thus function as a disk controlunit 121, which will be described later. The disk control unit 121controls the hierarchized disk 11 and also functions in the storagehierarchization control, which has been described with reference to FIG.1.

The memory 13 is a random access memory (RAM) or the like and stores theprogram to be executed by the CPU 12 as well as various pieces of dataand so on to be used by the CPU 12 when carrying out processing (controlprocessing and so on by the disk control unit 121) in the storage device10.

The server 20 is coupled to the storage device 10 through Fibre Channel(FC)/iSCSI and accesses the hierarchized disk 11 of the storage device10. The server 20 is coupled to the disk control unit 121 (CPU 12) ofthe storage device 10 through a local area network (LAN) and manages thestorage device 10. The server 20 includes a CPU 21 and a memory 22.

The CPU 21 loads the application (application program) 211 stored in thememory 22 and executes the application 211 to thus issue a read/write(R/W) command (input/output request) to the hierarchized disk 11 of thestorage number 10. As described above, the application 211 recognizesthe hierarchized disk 11 as the logical disk 110 and issues the R/Wcommand to the logical disk 110.

In addition, the CPU 21 loads a program stored in the memory 22 andexecutes the program to thus realize a virtual driver (virtual device)212 between the application 211 and the storage number 10. The virtualdriver 212 functions as an access mode identification unit, which willbe described later.

Furthermore, the CPU 21 loads a program stored in the memory 22 andexecutes the program to thus create a file access mode table 221, whichwill be described later, and to function as the management unit 213,which will be described later, using the created table 221.

The memory 22 is a RAM or the like and stores the programs to beexecuted by the CPU 21 and the table 221 as well as various pieces ofdata and so on to be used by the CPU 21 when carrying out processing(processing and so on by the application 211, the virtual driver 212,and the management unit 213) in the server 20.

In the storage system 1 illustrated in FIG. 2, the single server 20includes the application 211, the virtual driver 212, the managementunit 213, and the file access mode table 221. Alternatively, theapplication 211, the virtual driver 212, the management unit 213, andthe file access mode table 221 may be distributed between two servers.For example, a business server that accesses the storage device 10 mayinclude the application 211 and the virtual driver 212, and a managementserver may be coupled to the business server and the storage device 10through a LAN and may include the management unit 213 and the fileaccess mode table 221.

Hereinafter, specific functions of the disk control unit 121, thevirtual driver 212, and the management unit 213 of the storage system 1of the embodiment will be described with reference to FIG. 3. Inaddition, a specific example of the file access mode table 221 stored inthe memory 22 of the server 20 will be described with reference to FIG.4. FIG. 3 schematically illustrates the function and the operation ofthe storage system 1, and FIG. 4 illustrates an example of the fileaccess mode table 221.

Upon receiving an R/W command (input/output request) to the storagedevice 10 from the application 211, the virtual driver (virtual device)212 functions as the access mode identification unit that identifiesaccess mode information on a file-by-file basis. The access modeinformation includes information for identifying the application 211that uses the storage device 10 (i.e., application name or the like),information for identifying the target file of the R/W command (i.e.,file name or the like), and an access mode of the target file. Thevirtual driver 212 provides the management unit 213 with the obtainedand identified access mode information (see arrow A1 in FIG. 3).

The virtual driver 212 identifies the access mode of the target file,that is, whether the target file is a sequential access file or a randomaccess file, through the following process. The virtual device 212determines whether or not the R/W command seeks an R/W position(input/output position) in the target file through an index. If the R/Wcommand does not seek the R/W position through an index, that is, whenthe R/W command reads the target file from the beginning thereof, thevirtual device 212 determines that the target file is a sequentialaccess file. Meanwhile, if the R/W command seeks the R/W positionthrough an index, the virtual device 212 determines that the target fileis a random access file.

The virtual driver 212 identifies the access mode of each target filethat is not registered in the file access mode table 221, among thefiles to be used by the application 211. In addition, the virtual driver212 continues with the identification of the access mode for a specificperiod of time after the application 211 starts accessing the storagedevice 10.

The disk control unit 121 obtains block information, which containsstorage locations (physical locations) of data blocks included in eachfile stored in the hierarchized disk 11, and access information of eachdata block (see arrow A2 in FIG. 3) and provides the management unit 213of the server 20 with the obtained block information and accessinformation (see arrow A3 in FIG. 3). The block information includesinformation for identifying the application 211 (i.e., application nameor the like), information for identifying a target file to be used bythe application 211 (i.e., file name or the like), and information onthe physical locations of the data blocks included in the target file(i.e., a physical storage where the logical disk 110, which isrecognized by the application 211 of the server 20, is located).Meanwhile, the access information includes the frequency of access toeach data block by the application 211.

The management unit 213 registers the access mode information providedby the virtual device 212 and the block information and the accessinformation provided by the disk control unit 121 into the file accessmode table 221 in the memory 22 (see arrow A4 in FIG. 3).

As illustrated in FIG. 4, the application name of the application 211,the file name of the target file to be used by the application 211, andthe access mode (sequential access or random access) of the target fileidentified by the virtual driver 212 are registered into the file accessmode table 221 on the basis of the access mode information provided bythe virtual device 212. In addition, as illustrated in FIG. 4, the blockinformation and the access information provided by the disk control unit121 are associated with the access mode information through theapplication name and the file name, which are then registered into thefile access mode table 221. In other words, the storage location of eachdata block included in the target file and the frequency of access toeach data block are registered. In FIG. 4, the storage location of andthe frequency of access to a single data block are illustrated. Inreality, however, the storage location of and the frequency of access toeach data block are registered. In FIG. 4, the unit for the frequency ofaccess is input/output per second (IOPS) indicating the reading/writingfrequency per second.

The management unit 213 refers to the file access mode table 221 (seearrow A5 in FIG. 3) and determines a data block to be relocated.Specifically, the management unit 213 determines a data block that islocated in the SSD 111 and has a low frequency of access to be the datablock to be relocated to the SAS disk 112. Meanwhile, the managementunit 213 determines a data block that is located in the SAS disk 112 andhas a high frequency of access to be the data block to be relocated tothe SSD 111. In addition, the management unit 213 refers to the fileaccess mode table 221 (see arrow A5 in FIG. 3) and determines the accessmode (sequential access or random access) of the data block to berelocated. In other words, the management unit 213 determines the accessmode of the data block on the basis of the access mode information oneach file that is used by the application 211 and the block informationon each file provided by the disk control unit 121.

In addition, the management unit 213 determines the content ofrelocation in the hierarchized disk 11 on the basis of the blockinformation (storage location) of the data block to be relocated, whichhas been determined to be relocated on the basis of the frequency ofaccess thereto, and the access mode, which has been determined by themanagement unit 213, of the data block to be relocated, as will bedescribed later. The management unit 213 instructs the disk control unit121 of the storage device 10 to relocate the data block in accordancewith the determined relocation content (see arrow A6 in FIG. 3).

The disk control unit 121 of the storage device 10 relocates the datablock in the hierarchized disk 11 as specified by the management unit213.

In the storage system 1 of the embodiment, when a data block isrelocated from the SSD 111 to the SAS disk 112, the content of thatrelocation is determined by the management unit 213 in a manner thatwill be described below with reference to items (A1) to (A4), and thedisk control unit 121 relocates the target data block. A specific methodfor determining the content of relocation by the management unit 213will be described later. In addition, a specific example of relocationby the disk control unit 121 will be described later with reference toFIGS. 8 and 9.

[2] Operation of Storage System of Embodiment

In the storage device 10, access information (access frequency) of adata area is determined on a data block by data block basis through thefunction of the storage hierarchization control of the disk control unit121. To date, with the data obtained on a data block by data block basisthrough the function of the storage hierarchization control of the diskcontrol unit 121, it has been unclear as to which access mode(sequential access or random access) the data within each data blockhas. In the embodiment, however, the block information obtained by thedisk control unit 121 is associated with the access mode informationobtained by the virtual driver 212 on the server 20, making it possibleto determine the access mode of data blocks included, in each file.

A data block that has been determined to be a sequential access datablock is relocated such that the order of the data blocks included inthe file is retained. If data blocks that form a sequential access fileare distributed between the SSD 111 and the SAS disk 112, free spacesare provided respectively in front of and after such data blocks tofacilitate the sequential relocation. However, if free spaces are simplyprovided in front of and after a data block that has been relocated tothe SAS disk 112, the utilization efficiency of the SAS disk 112degrades. Thus, the management unit 213 may make a prediction as towhether a data block is to be relocated to a space in front of or aftera relocated data block on the basis of the frequency of relocation, andif the possibility of such relocation is high, the management unit 213may set the spaces in front of and after the relocated data block to befree spaces.

Hereinafter, the operation of the storage system 1 of the embodimentwill be described with reference to FIGS. 5 to 9.

[2-1] Operation of Storage System

The operation of the storage system 1 will be described with referenceto the flowchart (steps S1 to S9) illustrated in FIG. 5.

As described above, with the storage hierarchization control of the diskcontrol unit 121, the frequency of access to each data block can bedetermined, but it is not possible to determine the access mode of eachdata block. Meanwhile, in the storage system 1 of the embodiment, thevirtual driver 212 is established on the server 20, and the virtualdriver 212 and the storage hierarchization control function of the diskcontrol unit 121 are made to cooperate by the management unit 213,making it possible to determine the access mode of the each data block.

In the server 20, if the application 211 issues an R/W command to atarget file and the virtual driver 212 receives the R/W command (YESroute in step S1), the virtual driver 212 refers to the file access modetable 221 in the memory 22 through the management unit 213. The virtualdriver 212 then determines whether or not the application name of theapplication 211 that has issued the R/W command this time and the filename of the target file to be accessed by the application 211 areregistered in the file access mode table 221 (step S2).

If the application name and the file name are both registered (YES routein step S2), the storage system 1 skips the processes in steps S3 and S4and proceeds to the process in step S5. Meanwhile, if at least one ofthe application name and the file name is not registered (NO route instep S2), the virtual driver 212 determines and obtains the applicationname of the application 211, the file name of the target file, and theaccess mode of the target file (step S3). The procedure for determiningthe access mode in step S3 will be described later with reference toFIG. 6.

The virtual driver 212 then provides the management unit 213 with theobtained application name, file name, and access mode (see arrow A1 inFIG. 3) and registers the application name, the file name, and theaccess mode into the file access mode table 221 through the managementunit 213 (step S4; see arrow A4 in FIG. 3). In the case where theapplication name is registered but the file name is not registered inthe file access mode table 221, the virtual driver 212 provides themanagement unit 213 with the file name and the access mode.

Thereafter, in step S5, the disk control unit 121 obtains the blockinformation that includes the storage location (physical location) ofthe data block in the target file which the application 211 is accessingand the access information (access frequency) of that data block (stepS5; see arrow A2 in FIG. 3).

The disk control unit 121 then provides the management unit 213 of theserver 20 with the obtained block information and access information(see arrow A3 in FIG. 3) and registers the block information and theaccess information into the file access mode table 221 through themanagement unit 213 (step S6; see arrow A4 in FIG. 3). Here, asdescribed above, the storage location and the access frequency, whichhave been provided by the disk control unit 121, are associated with theaccess mode information by the application name or the file name andregistered. The file access mode table 221 stored in the memory 22 isupdated as evaluation of the access frequency or the like is repeated,and the management unit 213 instructs the disk control unit 121 torelocate a data block in accordance with the updated file access modetable 221 as follows.

Specifically, the management unit 213 refers to the file access modetable 221 (see arrow A5 in FIG. 3) and determines which data block is tobe relocated (step S7). Here, the management unit 213 determines a datablock that is located in the SSD 111 and has a low frequency of accessto be the data block to be relocated to the SAS disk 112. Meanwhile, themanagement unit 213 determines a data block that is located in the SASdisk 112 and has a high frequency of access to be the data block to berelocated to the SSD 111. In addition, the management unit 213 refers tothe file access mode table 221 (see arrow A5 in FIG. 3) and determinesthe access mode (sequential access or random access) of the data blockto be relocated.

In addition, the management unit 213 determines the content ofrelocation in the hierarchized disk 11 on the basis of the blockinformation (storage location) of the data block to be relocated, whichhas been determined to be a block to be relocated on the basis of thefrequency of access thereto, and the access mode, which has beendetermined by the management unit 213, of the data block to berelocated. In other words, the management unit 213 determines or graspsthe storage location of the data block to be relocated by referring tothe file access mode table 221. As a result of grasping the storagelocation, if the data block to be relocated to the SAS disk 112 islocated on the SSD 111, the management unit 213 determines the contentof relocation such that the target data block is relocated to the SASdisk 112. In addition, as a result of grasping the storage location, ifthe data block to be relocated to the SSD 111 is located on the SAS disk112, the management unit 213 determines the content of relocation suchthat the target data block is relocated to the SSD 111. Meanwhile, as aresult of grasping the storage location, if the data block to berelocated to the SSD 111 is already located on the SSD 111, themanagement unit 213 retains the current arrangement of the target datablock. Similarly, as a result of grasping the storage location, if thedata block to be relocated to the SAS disk 112 is already located on theSAS disk 112, the management unit 213 retains the current arrangement ofthe target data block.

The management unit 213 instructs the disk control unit 121 of thestorage device 10 to relocate the data block in accordance with thecontent of relocation determined as described above (step S8; see arrowA6 in FIG. 3).

The disk control unit 121 of the storage device 10 then relocates thedata block in the hierarchized disk 11 in accordance with the content ofdata block relocation instructed by the management unit 213 (step S9).

[2-2] Access Mode Determination Procedure

In step S3 of FIG. 5, the virtual driver 212 determines the access modeof the target file through the procedure illustrated in FIG. 6. FIG. 6is a flowchart (steps S11 to S13) for describing the procedure fordetermining the access mode (access characteristics) of the target filein the embodiment.

The virtual device 212 determines whether or not the R/W command seeksthe R/W position in the target file through an index (step S11). If theR/W command does not seek the R/W position through an index, that is,when the R/W command reads the target file from the beginning thereof(NO route in step S11), the virtual device 212 determines that thetarget file is a sequential access file (step S12). Meanwhile, if theR/W command seeks the R/W position through an index (YES route in stepS11), the virtual device 212 determines that the target file is a randomaccess file (step S13).

[2-3] Relocation Procedure

Subsequently, with reference to the flowchart (steps S21 to S26)illustrated in FIG. 7, the procedure for relocating a data block fromthe SSD 111 to the SAS disk 112 (processes in steps S7 to S9 of FIG. 5)in the embodiment will be described in further detail.

First, the management unit 213 refers to the file access mode table 221and evaluates I/O characteristics (access information/access frequency)of the data block in the target file accessed by the application 211(step S21). Thus, the management unit 213 determines the data block thatis located in the SSD 111 and has a low frequency of access to be thedata block to be relocated to the SAS disk 112.

In addition, the management unit 213 refers to the file access modetable 221 and determines the access mode of the data block to berelocated, that is, whether the data block is a sequential access datablock or a random access data block (step S22).

The management unit 213 then determines the content of relocation in thehierarchized disk 11 in a manner similar to that in step S8 of FIG. 5 onthe basis of the information on the data block to be relocated (i.e.,storage location of the data block) and the access mode of the datablock. Then, the management unit 213 stores, in the memory 22, dataarrangement as mapping information used when the data block to berelocated is moved (relocated) from the SSD 111 to the SAS disk 112 inaccordance with the determined content of relocation (step S23).

Thereafter, the management unit 213 determines whether or not a specificevaluation period has passed (step S24), and if the evaluation periodhas not passed (NO route in step S24), the management unit 213 repeatsthe processes in steps S21 to S24 described above. At that time, themanagement unit 213 refers to the file access mode table 221 updatedthrough the processes in steps S1 to S4 of FIG. 5.

Meanwhile, if the evaluation period has passed (YES route in step S24),the management unit 213 instructs the disk control unit 121 to relocatethe data block in accordance with the mapping information stored in thememory 22 (step S25). The disk control unit 121 then moves (relocates)the data block to be relocated from the SSD 111 to the SAS disk 112 inaccordance with the content of relocation instructed by the managementunit 213 (step S26).

Note that the management unit 213 determines a data block that islocated in the SAS disk 112 and has a high frequency of access to be thedata block to be relocated to the SSD 111. As described above, in theSSD 111, whether the data blocks contained in a sequential access fileare located sequentially or fragmented and arranged randomly does notmake a difference in terms of access performance. Thus, when a datablock is relocated from the SAS disk 112 to the SSD 111, the managementunit 213 instructs the disk control unit 121 to relocate the target datablock to any given free space, in the. SSD 111 without determining theaccess mode of the target data block. The disk control unit 121 thusrelocates the target data block on the SAS disk 112 to any given freespace in the SSD 111 in accordance with such an instruction from themanagement unit 213.

[2-4] Method for Determining Data Block Relocation Content

The method for determining the content of relocation by the managementunit 213 in step S8 of FIG. 5 or in step S23 of FIG. 7 will now bedescribed. Here, in particular, the method for determining the contentof relocation for relocating data blocks that have been determined to besequential access data blocks while retaining the sequentiality thereofwill be described. Note that a file for which the access mode indicatessequential access will be referred to as a sequential file, and a filefor which the access mode indicates random access will be referred to asa random file, hereinafter.

First, the method for determining the content of relocation in thestorage system 1 of the embodiment will be described in brief,hereinafter. When relocating data blocks included in a sequential file,the management unit 213 determines the content of relocation such thatthe data blocks are arranged sequentially on the basis of theinformation obtained by the virtual driver 212. However, if some of thedata blocks included in the file are moved and the entire file is notrelocated sequentially, the management unit 213 provides free spaces infront of and after the data blocks that have been relocatedsequentially. Thus, when data blocks are to be relocated thereafter, themanagement unit 213 can locate the data blocks sequentially using thefree spaces. Meanwhile, when data blocks included in a random file areto be relocated, the management unit 213 determines the content ofrelocation so as to relocate the data blocks in the random file to areasexcluding the area for the data blocks in the sequential file and thefree spaces. In addition, the management unit 213 may release the freespaces that have been provided in front of and after the partial datablocks when relocating the sequential file in the following cases.Specifically, the management unit 213 reevaluates the frequency ofaccess through the storage hierarchization control function of the diskcontrol unit 121 when relocating a random file. If the evaluation resultremains the same, the management unit 213 determines that a data blockin a sequential file is not to be relocated to the free space andreleases the free space to allow a data block in a random file to berelocated thereto. Note that, as described above, if spaces in front ofand after the relocated data block are simply set to be free spaces, theutilization efficiency of the disk degrades. Therefore, the managementunit 213 may make a prediction as to whether a data block is to berelocated to a space in front of or after a relocated data block on thebasis of the frequency of relocation, and if the possibility of suchrelocation is high, the management unit 213 may provide free spaces infront of and after the relocated data block.

In the storage system 1 of the embodiment, when a data block isrelocated from the SSD 111 to the SAS disk 112, the management unit 213determines the content of relocation, and the disk control unit 121relocates the target data block, in a manner indicated by the followingitems (A1) to (A4).

(A1) Case where the access mode of the data block to be relocatedindicates sequential access and a plurality of sequential data blocksare present on the SAS disk 112 to which the data block is to berelocated. The management unit 213 determines the content of relocationsuch that the plurality of sequential data blocks are sequentiallyrelocated to the SAS disk 112 and instructs the disk control unit 121accordingly. Thus, the disk control unit 121 sequentially relocates theplurality of sequential data blocks to the SAS disk 112 in thehierarchized disk 11 of the storage device 10.

(A2) Case where the access mode of the data block to be relocatedindicates sequential access and another data block to be located infront of or after that data block is not present on the SAS disk 112 towhich the data block is to be relocated. The management unit 213determines the content of relocation such that a free space for theother data block is to be provided in front of or after the data blockrelocated to the SAS disk 112 and instructs the disk control unit 121accordingly. Thus, the disk control unit 121 provides the free space forthe other data block in front of or after the data block relocated tothe SAS disk 112 in the hierarchized disk 11 of the storage device 10.

(A3) Case where the other data block is not relocated to the free spaceeven after a specific period of time elapses or relocation processing ofa data block is carried out a specific number of times after the freespace is provided.

The management unit 213 determines the content of relocation such thatthe free space is released and a data block other than the other datablock is relocated to the free space and instructs the disk control unit121 accordingly. Thus, the disk control unit 121 relocates a data blockother than the other data block to the free space.

(A4) Case where the access mode of the data block to be relocatedindicates random access. The management unit 213 determines the contentof relocation such that the data block is relocated in accordance withthe arrangement of data blocks for which the access mode indicatessequential access and instructs the disk control unit 121 accordingly.Thus, the disk control unit 121, taking the area for the sequentialaccess data blocks and the free space into consideration, relocates therandom access data block to an area excluding the area for thesequential access data blocks and the free space.

A specific example of relocation by the disk control unit 121 will nowbe described with reference to FIGS. 8 and 9. FIGS. 8 and 9 illustrate aspecific example of relocating data blocks in the storage system 1. InFIGS. 8 and 9, four blocks S1 to S4 indicate sequential data blocksincluded in a sequential file A, and the four data blocks S1 to S4,which are to be arranged sequentially in this order, form the singlesequential file A. A block labeled “free” indicates a free space thathas a capacity of a single data block.

FIG. 8 illustrates a case where the four data blocks S1 to S4 includedin the sequential file A located on the SSD 111 and four data blocks Rincluded in a random file B located on the SSD 111 are to be relocatedin the SAS disk 112. In such a case, the management unit 213 determinesthe access mode of each data block, that is, whether each data block isa sequential access data block or a random access data block, and thendefragmentation relocation of the data blocks from the SSD 111 to theSAS disk 112 is carried out. Specifically, the four data blocks S1 to S4included in the sequential file A are relocated so as to be arrangedsequentially in the SAS disk 112. The four data blocks R included in therandom file B are each relocated to a given free space aside from theareas where the data blocks S1 to S4 are located in the SAS disk 112.

In the case of the upper SAS disk 112 illustrated in FIG. 9, as in theexample illustrated in FIG. 8, the entire data blocks included in thesequential file A and the random file B on the SSD 111 are to be moved(relocated) and are relocated to the SAS disk 112. In this case,relocation is carried out in a manner similar to that described withreference to FIG. 8.

In the case of the lower SAS disk 112 illustrated in FIG. 9, some of thedata blocks included in the sequential file A and the random file B onthe SSD 111 are to be moved (relocated) and are relocated to the SASdisk 112. In this case, the two data blocks S3 and S4 included in thesequential file A and the two data blocks R included in the random fileB are to be moved (relocated) and are relocated to the SAS disk 112. Inthis case as well, the management unit 213 determines the access mode ofeach data block, that is, whether each data block is a sequential accessdata block or a random access data block, and then defragmentationrelocation of the data blocks from the SSD 111 to the SAS disk 112 iscarried out. Specifically, the two data blocks S3 and S4 included in thesequential file A are relocated so as to be arranged sequentially in theSAS disk 112. In addition, since there is a possibility that thesequential data blocks S1 and S2 are relocated in front of the datablocks S3 and S4 through later relocation processing, free spaces fortwo data blocks are provided. The two data blocks R included in therandom file B are each relocated to a given free space excluding thearea where the data blocks S3 and S4 are located and the free spaces forthe two data blocks provided in front of the data blocks S3 and S4 inthe SAS disk 112.

[3] According to the Storage System 1 of the Embodiment, the FollowingEffects Can be Obtained.

Associating the block information obtained by the disk control unit 121with the access mode information obtained by the virtual driver 212 onthe server 20 makes it possible to determine the access mode of the datablocks included in each file. Thus, the data blocks can be relocated onthe basis of the result of determining the access mode of the datablocks, and thus degradation in performance of sequentially accessingdata moved from the SSD 111 to the SAS disk 112 can be suppressed. Inaddition, data fragmentation caused by relocating the data blocks in thehierarchized disk 11 can be suppressed, making it possible to suppress anegative influence caused by fragmentation or the like.

Furthermore, the access mode of each target file used by the application211 is determined by the virtual driver 212. Thus, the access mode ofeach file can be reliably determined as to whether the file is asequential access file or a random access file at a section close to anoperating system (OS). However, using the virtual driver 212 simply fordetermining the access mode may cause the access speed to be reduced.Thus, the virtual driver 212 continues with the determination of theaccess mode only for a specific period of time after the application 211starts accessing the storage device 10 and stops the determination ofthe access mode after the specific period of time elapses. Accordingly,reduction in the access speed can be suppressed.

In addition, the virtual driver 212 collects access mode informationonly of the files that are not registered in the file access mode table221. Thus, the block arrangement in the hierarchized disk 11 can beoptimized without increasing a load on the disk access.

If the data blocks included in a sequential file are distributed betweenthe SSD 111 and the SAS disk 112, providing free spaces in front of andafter such data blocks makes it possible to relocate data blockssequentially with ease.

Here, the management unit 213 makes a prediction as to whether a datablock is to be relocated in front of or after a relocated data block onthe basis of the frequency of relocation, and if the possibility of suchrelocation is high, the management unit 213 sets free spaces in front ofand after the relocated data block. Thus, free spaces can be set infront of and after the data block relocated to the SAS disk 112 withoutreducing utilization efficiency of the SAS disk 112.

If another sequential data block is not relocated to the free space evenafter a specific period passes or relocation processing of data blocksis carried out a specific number of times after the free spaces areprovided in front of and after the relocated data block, the managementunit 213 releases the free spaces. Thus, the management unit 213 canrelocate data blocks to the free spaces, and the area on the SAS disk112 can be used effectively.

[4] Other

In the embodiment the single server 20 is provided for the singlestorage device 10. Alternatively, the storage system 1 may be configuredsuch that multiple servers access the storage device 10. In such a case,at least one of the servers may be configured to function as the server20 described above, and various pieces of information obtained by theserver 20 may be shared among the multiple servers. Thus, an effectsimilar to that of the embodiment described above can be obtained ineach of the servers by the use of the single server 20.

All or part of the functions of the disk control unit 121, the virtualdriver 212, and the management unit 213 described above can be realizedby a computer (including a CPU, an information processing device, andvarious terminals) that functions as a copy processing unit 24 executinga specific program (storage control program).

In addition, the application program may be provided in the form of aprogram recorded on a computer readable recording medium such as aflexible disk, a CD (CD-ROM, CD-R, CD-RW, etc.), a DVD (DVD-ROM,DVD-RAM, DVD-R, DVD-RW, DVD+R, DVD+RW, etc.) and a Blu-ray Disc. In sucha case, the computer reads the program from the recording medium,transfers the program to an internal storage device or an externalstorage device, and stores the program therein for use.

Here, the computer conceptually includes hardware and an OS and refersto hardware that operates under the control of the OS. In addition, in acase in which the OS is unnecessary and the hardware is operated solelythrough a program, the hardware itself corresponds to the computer. Thehardware includes at least a microprocessor such as a CPU and a unitconfigured to read a computer program recorded in the recording medium.The stated program includes program codes that cause the computer asdescribed above to realize the functions of the disk control unit 121,the virtual driver 212, and the management unit 213. In addition, partof these functions may be realized not through the program but throughthe OS.

All examples and conditional language recited herein are intended forpedagogical purposes to aid the reader in understanding the inventionand the concepts contributed by the inventor to furthering the art, andare to be construed as being without limitation to such specificallyrecited examples and conditions, nor does the organization of suchexamples in the specification relate to a showing of the superiority andinferiority of the invention. Although the embodiment of the presentinvention has been described in detail, it should be understood that thevarious changes, substitutions, and alterations could be made heretowithout departing from the spirit and scope of the invention.

What is claimed is:
 1. A non-transitory computer-readable recordingmedium having stored therein a program for causing a computer to executea process, the process comprising: identifying a data block from among aplurality of data blocks in a first storage for relocation to a secondstorage; determining an access mode of the identified data block, theaccess mode including sequential access or random access; and relocatingthe identified data block to the second storage based on the determinedaccess mode.
 2. The non-transitory computer-readable recording mediumaccording to claim 1, wherein data of the identified data block aresequentially relocated in the second storage when the determined accessmode is the sequential access.
 3. The non-transitory computer-readablerecording medium according to claim 1, wherein the identified data blockrelocated in the second storage is accessed using a seeking motion for adisk.
 4. The non-transitory computer-readable recording medium accordingto claim 3, wherein the plurality of data blocks in the first storage isaccessed without the seeking motion for the disk.
 5. The non-transitorycomputer-readable recording medium according to claim 1, wherein theaccess mode is determined based on an access mode by an applicationaccessing a file including the data block.
 6. The non-transitorycomputer-readable recording medium according to claim 5, wherein theaccess mode is determined based on whether an access position in thefile is sought.
 7. The non-transitory computer-readable recording mediumaccording to claim 6, wherein the determined access mode is thesequential access when the access position in the file is not sought. 8.The non-transitory computer-readable recording medium according to claim7, wherein data of the identified data block are sequentially arrangedin the second storage.
 9. The non-transitory computer-readable recordingmedium according to claim 1, wherein the process further comprises:setting a storing position for other data in a position sequentiallylocated to a position of the data relocated in the second storage whenthe determined access mode is the sequential access.
 10. Thenon-transitory computer-readable recording medium according to claim 9,wherein the process further comprises: releasing the storing portionwhen the other data is relocated in the second storage after a specificperiod.
 11. The non-transitory computer-readable recording mediumaccording to claim 1, wherein the process further comprises: obtainingan access frequency for the data block, and relocating the data from thefirst storage to the second storage based on the access frequency. 12.The non-transitory computer-readable recording medium according claim 5,wherein the access mode is determined during a specific period after theapplication starts to access to the file.
 13. The non-transitorycomputer-readable recording medium according to claim 1, wherein theprocess further comprises: relocating data for which the determinedaccess mode indicates the random access in accordance with therelocation of the data for which the access mode indicates thesequential access.
 14. The non-transitory computer-readable recordingmedium according to claim 1, wherein the first storage and the secondstorage are hierarchically managed.
 15. The non-transitorycomputer-readable recording medium according to claim 1, wherein acombination of the first storage and the second storage is managed as avirtual storage.
 16. The non-transitory computer-readable recordingmedium according to claim 1, wherein an access speed of the firststorage is faster than an access speed of the second storage.
 17. Thenon-transitory computer-readable recording medium according to claim 1,wherein the identifying comprises identifying a plurality of data blocksfor relocation, wherein the process further comprises sequentiallyrelocating the plurality of identified data blocks to the second storagewhen the access mode is sequential access.
 18. A system comprising: amemory; and a processor coupled to the memory and configured to executea process, the process including: identifying a data block from among aplurality of data blocks in a first storage for relocation to a secondstorage; determining an access mode of the identified data block, theaccess mode including sequential access or random access; and relocatingthe identified data block to the second storage based on the determinedaccess mode.
 19. A method comprising: identifying a data block fromamong a plurality of data blocks in a first storage for relocation to asecond storage; determining an access mode of the identified data block,the access mode including sequential access or random access; andrelocating the identified data block to the second storage based on thedetermined access mode.
 20. A non-transitory computer-readable recordingmedium having stored therein a program for causing a computer to executea process, the process comprising: when data stored in a first storageare accessed, determining an access mode of the accessed data, theaccess mode including sequential access or random access; and arrangingthe accessed data in a second storage based on the determined accessmode.